home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / program / eflibpt4.zip / DEMO / WINDOWS / BROWSER.PAS next >
Pascal/Delphi Source File  |  1996-08-16  |  1KB  |  36 lines

  1. { Borland Pascal Extended Function Library - EFLIB (C) Johan Larsson, 1996
  2.   Demonstration; text browser
  3.  
  4.   EFLIB IS PROTECTED BY THE COPYRIGHT LAW AND MAY NOT BE COPIED, SOLD OR
  5.   MANIPULATED. FOR MORE INFORMATION, SEE PROGRAM MANUAL! THIS DEMONSTRAT-
  6.   ION PROGRAM MAY FREELY BE USED AND DISTRIBUTED.                          }
  7.  
  8.  
  9. uses EFLIBDEF, EFLIBINI, EFLIBDAT, EFLIBDIA, EFLIBIO, EFLIBTXT;
  10.  
  11.  
  12. var MyBrowser : BrowserObjectType;
  13.     MyText    : TextObjectType;
  14.     MyStream  : FileStreamObjectType;
  15.  
  16. begin
  17.      with MyText do begin
  18.           Initialize;
  19.  
  20.           with MyStream do begin
  21.                Initialize ('..\hamlet.txt', 1024);
  22.                MyText.StreamImport (@MyStream, 1024);
  23.                Intercept;
  24.           end;
  25.      end;
  26.  
  27.      with MyBrowser do begin
  28.           InitializeBrowser (@MyText, { Resource data type }
  29.                              20, 5, 60, 20, { Window settings }
  30.                              StringUpperCase(FileWithoutDirectory(ParamStr(1))),
  31.                              ThinBorder, TRUE, FALSE);
  32.           Loop; { Allow events (browsing until done) }
  33.      end;
  34.  
  35.      MyText.Intercept; MyBrowser.Intercept;
  36. end.